#ifndef OUTORNODE_HPP
# define OUTORNODE_HPP

# include "ExpressionNode.hpp"

class OutOrNode : public ExpressionNode
{
public:
    OutOrNode(bool exclusive = false);
    virtual ~OutOrNode();

    virtual Tribool solve(Universe &universe);
    virtual void addChild(ExpressionNode *child);
    virtual ExpressionNode* clone(std::map<int, ExpressionNode*>& existingNodes);
    virtual NodeType::Type getType() const;

public:
    void setLeftParent(ExpressionNode* parent);
    void setRightParent(ExpressionNode* parent);

private:
    void _duplicateUniverse(Universe& universe, Tribool left, Tribool right);

private:
    bool _exclusive;
    ExpressionNode* _child;
    ExpressionNode* _leftParent;
    ExpressionNode* _rightParent;
};

#endif // OUTORNODE_HPP
